from typing import Optional, List
import os
# from langchain_community.llms import QianfanLLMEndpoint
from langchain_community.llms import QianfanLLMEndpoint

AK = '2jCwbiCWReSVlPbt53f9pYhP'
SK = 'dwJ8BULLCsBMXsmtjyxNI8hkw4y0HPXq'
os.environ['QIANFAN_AK'] = AK
os.environ['QIANFAN_SK'] = SK
# llm = QianfanLLMEndpoint(streaming=True, model='Llama-2-70b-chat')
llm = QianfanLLMEndpoint(streaming=True, model='Llama-2-70b-chat')
res = llm('2024年美股暴跌预测要持续多久')
print(res)
